'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''
from base.rdf.Container import Container

'''
 * RDF Sequence container.
 *
 * <p>This interface defines methods for accessing RDF Sequence resources.
 * These methods operate on the RDF statements contained in a model.  The
 * Sequence implementation may cache state from the underlying model, so
 * objects should not be added to or removed from the Sequence by directly
 * manipulating its properties, whilst the Sequence is being
 * accessed through this interface.</p>
 *
 * <p>When a member is deleted from a sequence using this interface, or an
 * iterator returned through this interface, all the other members with
 * higher ordinals are renumbered to one below what they previously were.</p>
 *
 * <p>This interface provides methods supporting typed literals.  This means
 * that methods are provided which will translate a built in type, or an
 * object to an RDF Literal.  This translation is done by invoking the
 * <CODE>toString()</CODE> method of the object, or its built in equivalent.
 * The reverse translation is also supported.  This is built in for built
 * in types.  Factory objects, provided by the application, are used
 * for application objects.</p>
 * <p>This interface provides methods for supporting enhanced resources.  An
 * enhanced resource is a resource to which the application has added
 * behaviour.  RDF containers are examples of enhanced resources built in
 * to this package.  Enhanced resources are supported by encapsulating a
 * resource created by an implementation in another class which adds
 * the extra behaviour.  Factory objects are used to construct such
 * enhanced resources.</p>
'''
from abc import ABC, abstractmethod

class Seq(ABC, Container):

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, RDFNode o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, boolean o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, long o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, char o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, float o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, double o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, String o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     * @param l     the language of the value added
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, String o, String l
    # result Seq
    @abstractmethod
    def add(self, index, o, l):
        pass

    '''
     * Insert a new member into the sequence at the specified position.
     *
     * <p>The existing member at that position, and all others with higher indexes,
     * have their index increased by one.</p>
     *
     * @param index The index of the new member,
     * @param o     The member to be added.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index, Object o
    # result Seq
    @abstractmethod
    def add(self, index, o):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result boolean
    @abstractmethod
    def getBoolean(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result byte
    @abstractmethod
    def getByte(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result short
    @abstractmethod
    def getShort(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result int
    @abstractmethod
    def getInt(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result long
    @abstractmethod
    def getLong(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result char
    @abstractmethod
    def getChar(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result float
    @abstractmethod
    def getFloat(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result double
    @abstractmethod
    def getDouble(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result String
    @abstractmethod
    def getString(self, index):
        pass

    '''
     * Get the language of the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result String
    @abstractmethod
    def getLanguage(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * <p>The supplied factory object is used to create the returned object.</p>
     *
     * @param index The index of the required member.
     * @param f     The factory object used to create the returned object.
     *              .
     * @return The member at the given index.
    '''
    #@Deprecated
    # param int index, ResourceF f
    # result Resource
    @abstractmethod
    def getResource(self, index, f):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result Literal
    @abstractmethod
    def getLiteral(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result Resource
    @abstractmethod
    def getResource(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result RDFNode
    @abstractmethod
    def getObject(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result Bag
    @abstractmethod
    def getBag(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result Alt
    @abstractmethod
    def getAlt(self, index):
        pass

    '''
     * Get the member at a given index.
     *
     * @param index The index of the required member.
     *              .
     * @return The member at the given index.
    '''
    # param int index
    # result Seq
    @abstractmethod
    def getSeq(self, index):
        pass

    '''
     * Remove the member at the specified index.
     *
     * <p>All other members with a higher index will have their index reduced by
     * one.</p>
     *
     * @param index The index of the member to be removed.
     *              .
     * @return this object to enable cascading of method calls.
    '''
    # param int index
    # result Seq
    @abstractmethod
    def remove(self, index):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param RDFNode o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param boolean o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param long o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param char o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param float o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param double o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param String o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     * @param l the language of the member sought
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param String o, String l
    # result int
    @abstractmethod
    def indexOf(self, o, l):
        pass

    '''
     * Return the index of a given member of the sequence.
     *
     * <p>If more the same value appears more than once in the sequence,
     * it is undefined which of the indexes will be returned.</p>
     *
     * <p>If the member is not found in this sequence, a value of 0 is returned.</p>
     *
     * @param o The member sought.
     *          .
     * @return an index of the member in this sequence or 0 if the
     * member is not found in this sequence.
    '''
    # param Object o
    # result int
    @abstractmethod
    def indexOf(self, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then an exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, RDFNode o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, boolean o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, long o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, char o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, float o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, double o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, String o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @param l     The language of the value set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, String o, String l
    # result Seq
    @abstractmethod
    def set(self, index, o, l):
        pass

    '''
     * Set the value at a given index in the sequence.
     *
     * <p>If the index is not in the range 1 to the size of the
     * sequence, then a Jena exception is raised.</p>
     *
     * @param index The index whose member is to be set.
     * @param o     The value to be set.
     * @return this object to enable cascading method calls.
     * @throws SeqIndexBoundsException
    '''
    # param int index, Object o
    # result Seq
    @abstractmethod
    def set(self, index, o):
        pass

